/**
 * 报价单模版 api 封装
 *
 * @Author:    zzx
 * @Date:      2025-08-06 11:03:50
 * @Copyright  zzx
 */
import { postRequest, getRequest } from '/@/lib/axios';

export const quotationTemplateApi = {

  /**
   * 分页查询  @author  zzx
   */
  queryPage : (param) => {
    return postRequest('/quotationTemplate/queryPage', param);
  },

  /**
   * 增加  @author  zzx
   */
  add: (param) => {
      return postRequest('/quotationTemplate/add', param);
  },

  /**
   * 修改  @author  zzx
   */
  update: (param) => {
      return postRequest('/quotationTemplate/update', param);
  },


  /**
   * 删除  @author  zzx
   */
  delete: (id) => {
      return getRequest(`/quotationTemplate/delete/${id}`);
  },

  /**
   * 批量删除  @author  zzx
   */
  batchDelete: (idList) => {
      return postRequest('/quotationTemplate/batchDelete', idList);
  },

  /**
   * 更新明细  @author  zzx
   */
  editItems: (detail) => {
      return postRequest('/quotationTemplate/editItems', detail);
  },

  /**
   * 通过模版id查询明细  @author  zzx
   */
  queryItemsById: (templateId) => {
      return getRequest(`/quotationTemplate/queryItemsById/${templateId}`);
  },
  /**
   * 查询全部模板  @author  zzx
   */
  queryAll: () => {
      return postRequest(`/quotationTemplate/queryAll`, {});
  },

};
